<#assign p = p!0>
<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <#include "/common/common_head.ftl">
    <script type="text/javascript">
   $(function(){
	    $("input[name='parentids']").click(function () {
	    if ($("input[name='parentids']:checked").length>0) {
		    /* $("input[name='idsnew']").attr("checked", true); */
	    	var ids = document.getElementsByName("ids");
		    for(var i=0;i<ids.length;i++){
		    	ids[i].checked=true;
		    }
	    }
	    else {
		   /*  $("input[name='idsnew']").attr("checked", false); */
	    	var ids = document.getElementsByName("ids");
		    for(var i=0;i<ids.length;i++){
		    	ids[i].checked=false;
		    }
	    }
	    }); 
     }) 
    </script>
  </head>

  <body style="padding-top:0px;">

    	<!-- 主内容区域 S -->
	<div class="" id="mainBoard">
	<!-- 导航路径 S -->
	<ol class="breadcrumb">
	  <li><a href="#">系统管理</a></li>
	  <li class="active">动态查询模板列表</li>
	</ol>
	<!-- 导航路径 E -->

	<!-- 标题区 S -->
	<h2 class="sub-header">数据模板配置</h2>
	<!-- 标题区 E -->

        <!-- 操作区 S -->
        <div class="container-fluid">
          <ul class="nav navbar-nav navbar-right">
            <li><a href="">添加数据模板</a></li>
          </ul>
        </div>
        <div class="table-responsive">
         <table class="table table-striped" id="categoryTable">
          	<thead>
                <tr>
                  <th><input type="checkbox" name="parentids" value=0>全选</th>
                  <th>名称</th>
                  <th>类型</th>
                  <th>列表</th>
                  <th>条数</th>
		  <th>描述</th>
                </tr>
             </thead>
             <tbody>
             <#if responseData??>
             <#assign queryResult = responseData.queryResult>
             <#list queryResult as result>
             <tr>
                <td>
	         <input type="checkbox" name="ids"  value="${result['id']?if_exists}" />
		 ${result['id']?if_exists}
		</td>
              	<td>${result['name']?if_exists}</td>
              	<td>${result['type']?if_exists}</td>
              	<#if result['query']?length lt 8>
                    <td>${result['query']?if_exists}</td>
                <#else>
                    <td>${result['query'][0..8]}...</td>
              	</#if>
              	<td>
		    <#if result['queryCount']?length lt 20>
                        ${result['queryCount']?if_exists}
                    <#else>
                        ${result['queryCount'][0..20]}...
              	    </#if>
		</td>
		<td>${result['desc']?if_exists}</td>
              	<td>
		<a href="">编辑</a>,
		<a href=" onclick="if(confirm('确定删除吗?')==false) return false;">删除</a>
		</td>
             </tr>
             </#list>
             </#if>
             </tbody>
         </table>
        
       </div>

        <!-- 新增分页条start -->
	<#if responseData??>
        <nav>
	 <ul class="pager">
	   <li>总记录数:<a href="#">${responseData.total?if_exists}</a></li>
	   <li>/总页数:<a href="#">${responseData.total/responseData.pageSize}</a></li>
	   <li>/当前页:<a href="#">${responseData.page+1}</a></li>
	   <li><a href="">上一页</a></li>
	   <li><a href="ss">下一页</a></li>
	 </ul>
	</nav>
	</#if>
	<!-- 新增分页条end -->
    </div> 
    
  </body>
</html>
                